package com.example.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * <pre>
 * 功能描述：
 * </pre>
 *
 * @author: 李明杰
 * @date: 2022/11/4 11:50
 */
@Component
public class IndexService {


    @Autowired
    UserService userService;

    public IndexService() {
        System.out.println("Constructor from indexService");
    }

    public void getService() { //为了测试是否装配了userService
        System.out.println(userService);
    }

    @PostConstruct
    public void aa() {
        System.out.println("init.");
    }
}
